package com.training.food.pojo;

import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
@Getter
@Setter
@Data
@NoArgsConstructor
@EqualsAndHashCode
@Entity
@Table( name ="farm" )
public class Farm implements Serializable {
    @Id
    private int farmId;
    @Column(name = "card")
    private String IdCard;
    @Column(name="phone")
    private String phone;
    @Column(name = "sex")
    private char sex;
    @Column(name ="address")
    private String address;
    @Column(name="name")
    private String name;

    public Farm(String idCard, String phone, char sex, String address, String name) {
        IdCard = idCard;
        this.phone = phone;
        this.sex = sex;
        this.address = address;
        this.name = name;
    }
}
